package com.yuanjin.util;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class Map_MyStationDB extends SQLiteOpenHelper {
	public static final String TABLE_NAME = "mystation";
	public static final String ID = "_id";
	public static final String LON = "lon";// 经度
	public static final String LAT = "lat";// 纬度
	public static final String ADDRESS = "address";// 地址
	public static final String TIME = "time";// 时间

	public Map_MyStationDB(Context context) {
		super(context, TABLE_NAME, null, 1);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("CREATE TABLE " + TABLE_NAME + "(" + ID
				+ " INTEGER PRIMARY KEY AUTOINCREMENT, " + LON + " DOUBLE,"
				+ LAT + " DOUBLE, " + ADDRESS + " TEXT NOT NULL, " + TIME
				+ " TEXT NOT NULL)");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub

	}

}
